var posiid = window.location.search.slice(window.location.search.lastIndexOf("?")+1);
// 向input标签中传值
document.getElementById("position_id").value = (posiid);

function selelt() {
    $.ajax({
        url: "/selectPosition",
        data:{ position_id:posiid },
        type: "POST",
        dataType: "json",
        timeout: 1000,
        cache: false,
        success: function(position) {
            console.log(position);
            var positionlist = position.data.valueOf();
            document.getElementById("position_name").value = (positionlist.posname);
            document.getElementById("position_introduction").value = (positionlist.posbrief);
            $("#staff_department").append(
                "<option value="+positionlist.depid.depid+">"+positionlist.depid.depname+"</option>"
            );
            $("select").val(positionlist.depid.depid);
        }
    });
}